package cn.acyou.startdocker.controller;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.HashMap;
import java.util.Map;

/**
 * @author fangyou
 * @version [1.0.0, 2021-08-12 14:15]
 */
@RestController
@RequestMapping("main")
public class MainController {

    private static final Logger log = LoggerFactory.getLogger(MainController.class);

    @GetMapping("page")
    public Map<String, String> page(String name){
        Map<String, String> resMap = new HashMap<>();
        resMap.put("id", "1");
        resMap.put("name", name);
        resMap.put("age", "23");
        log.info("当前访问：" + resMap);
        return resMap;
    }
}
